import request from '@/router/axios';
import config from '@/config/website'


//列表
export const equipmentList = (current, size, mold) => {
  return request({
    url: '/api/hg-public/equipmentinfo/page',
    method: 'get',
    params: {
      current,
      size,
      ...mold
    }
  })
}

// 根据物料组获取生产设备下拉选
export const getEquipments = (params) => {
  return request({
    url: '/api/hg-public/equipmentinfo/findAll',
    method: 'get',
    params: {
      ...params
    }
  })
}
//添加
export const equipmentAdd = (mold) => {
  return request({
    url: '/api/hg-public/equipmentinfo/save',
    method: 'post',
    data: mold
  })
}

//编辑时获取数据
export const equipmentDetail = (id) => {
  return request({
    url: '/api/hg-public/equipmentinfo/detail',
    method: 'get',
    params: {
      id
    }
  })
}

//编辑
export const equipmentUpdate = (mold) => {
  return request({
    url: '/api/hg-public/equipmentinfo/update',
    method: 'post',
    data: mold
  })
}

//删除
export const removeequipment = (mold) => {
  return request({
    url: '/api/hg-public/equipmentinfo/remove',
    method: 'post',
    data: mold
  })
}

